import { apiConfig, customApiConfig } from "@/config/apiConfig";
import { service, customService } from "@/config/request";

/**
 * 认证相关接口
 */
const auth = {
  /**
   * 获取短信验证码
   * @param {object} data
   * @param {string} data.phone 手机号
   * @returns
   */
  getSmsCode: (data) => customService.post(customApiConfig.auth.getSmsCode, data),
  /**
   * 通过姓名，手机号和验证码登录
   * @param {object} data
   * @param {string} data.userName 姓名
   * @param {string} data.userTel 手机号
   * @param {string} data.code 验证码
   * @returns
   */
  login: (data) => customService.post(customApiConfig.auth.login, data),
  /**
   * 退出登录
   * @returns
   */
  logout: () => customService.post(customApiConfig.auth.logout),
  /**
   * 专家权限确认
   * @param {object} data 
   * @param {string} data.phone 专家手机号
   * @returns 
   */
    getPermissionConfirm: (data) => customService.post(customApiConfig.auth.getPermissionConfirm, data),
};

export default auth;